﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package com.fminutes.vinciDll.analyze {
    import flash.events.*;
    import com.fminutes.vinciDll.*;
    import flash.utils.*;
    import flash.display.*;

    public class ImgAnalyze extends AnalyzeBase {

        private var _imgDic:Dictionary;
        private var _dllDic:Dictionary;
        private var _funDic:Dictionary;

        public function ImgAnalyze(){
            this._imgDic = new Dictionary();
            this._dllDic = new Dictionary();
            this._funDic = new Dictionary();
        }
        override public function analyze(_arg1:ByteArray, _arg2:DllFileObject, _arg3:Function):void{
            var _local4:Loader = new Loader();
            _local4.loadBytes(_arg1);
            _local4.contentLoaderInfo.addEventListener(Event.COMPLETE, this.bytesComplete);
            this._dllDic[_local4] = _arg2;
            this._funDic[_local4] = _arg3;
        }
        private function bytesComplete(_arg1:Event):void{
            var _local2:Loader = _arg1.target.loader;
            var _local3:DllFileObject = this._dllDic[_local2];
            var _local4:Function = this._funDic[_local2];
            var _local5:Bitmap = Bitmap(_arg1.target.content);
            this._imgDic[_local3.name] = _local5;
            _local3.result = _local5;
            _local3.status = DllFileObject.LOADED;
            delete this._dllDic[_local2];
            delete this._funDic[_local2];
            _local2.contentLoaderInfo.removeEventListener(Event.COMPLETE, this.bytesComplete);
            _local2 = null;
            _local4();
        }

    }
}//package com.fminutes.vinciDll.analyze 
